import util from '../../../../utils/utils';
Page({

  /**
   * 页面的初始数据
   */
  data: {
    value: ''
  },
  
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },
  initPage: function (options){
    var remark = options.remark;
    this.setData({
      value: remark,
    });
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  onUnload: function () {//如果页面被卸载时被执行
  },

  onInput(event) {
    this.setData({
      value: event.detail.value,
    });
  },
  sub: function (event){
    let self = this
    let pages;
    let prevPage = {};
    let app = getApp();
    let _detail = self.data.value
    pages = getCurrentPages();
    prevPage = pages[pages.length - 2];
    if (prevPage.route === 'pages/goods/pendingOrder/pendingOrder') {
      prevPage.upRemark(_detail);
    }
    app.globalData.tempParam = _detail;
    setTimeout(function () {
      wx.navigateBack();
    }, 100);
  }
})